﻿// This file is part of VideoLan.Inteop
//
// Copyright (C) 2008, Michael Melendez, http://www.MeediOS.com
//
//VideoLan.Inteop is free software; you can redistribute it and/or
//modify it under the terms of the GNU Lesser General Public
//License as published by the Free Software Foundation; either 
//version 2.1 of the License, or (at your option) any later version.
//
//VideoLan.Inteop is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//Lesser General Public License for more details.
//
//You should have received a copy of the GNU Lesser General Public 
//License along with this library.  If not, see <http://www.gnu.org/licenses/>.


using System;
using System.Collections.Generic;
using System.Text;

namespace VideoLan
{
    public class VlcEventArgs : EventArgs
    {
        private IntPtr _UserData;
        private  VlcCallbackArgs _Args;

        internal VlcEventArgs(VlcCallbackArgs Args, IntPtr UserData)
        {
            _Args = Args;
            _UserData = UserData;
        }

        public IntPtr UserData
        {
            get { return _UserData; }
        }
        internal VlcCallbackArgs Args
        {
            get { return _Args; }
        }
    }

    public class TimeChangedEventArgs : VlcEventArgs
    {
        internal TimeChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData)
            : base(Args, UserData)
        {
        }

        public long Time
        {
            get { return base.Args.media_player_time_changed.new_time; }
        }
    }
    public class PositionChangedEventArgs : VlcEventArgs
    {
        internal PositionChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData)
            : base(Args, UserData)
        {
        }

        public float Position
        {
            get { return base.Args.media_player_position_changed.new_position; }
        }
    }
    public class SeekableChangedEventArgs : VlcEventArgs
    {
        internal SeekableChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData)
            : base(Args, UserData)
        {
        }

        public bool IsSeekable
        {
            get { return Convert.ToBoolean(base.Args.media_player_seekable_changed.new_seekable); }
        }
    }
    public class PausableChangedEventArgs : VlcEventArgs
    {
        internal PausableChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData)
            : base(Args, UserData)
        {
        }

        public bool IsSeekable
        {
            get { return Convert.ToBoolean(base.Args.media_player_pausable_changed.new_pausable); }
        }
    }
    public class StateChangedEventArgs : VlcEventArgs
    {
        private VlcState _NewState;
        internal StateChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData)
            : base(Args, UserData)
        {
            _NewState = base.Args.media_state_changed.new_state;
        }
        internal StateChangedEventArgs(VlcCallbackArgs Args, IntPtr UserData, VlcState NewState)
            : base(Args, UserData)
        {
            _NewState = NewState;
        }

        public VlcState NewState
        {
            get { return _NewState; }
        }
    }
}
